// pages/index/HomeNav/PsychologicalAQ/PsychologicalAQ.js
const app = getApp()
Page({

  /**
   * 页面的初始数据
   */
  data: {
    pageNum: 1,
    url: '',
    questions: '',
    rtotal:[]
  },

  onLoad(options) {
    let that = this
    that.setData({
      url: app.globalData.URL
    })
    this.getQuestions()
  },
  getQuestions() {
    let that = this
    wx.request({
      method: 'GET',
      url: that.data.url + '/question/findByPage',
      data: {
        pageNum: that.data.pageNum,
        pageSize: 10
      },
      success(resp) {
        that.setData({
          questions: [...that.data.questions, ...resp.data.data.list]
        })
      }
    })
  },
  toIn() {
    wx.navigateTo({
      url: './answerContent/answerContent',
    })

  },


})